using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Floor2 : MonoBehaviour
{
    public float speed;
    public float current_time;
   
    void Update()
    {
        transform.position += new Vector3(speed * Time.deltaTime, 0, 0);

        if(current_time > 0)
        {
            current_time -= Time.deltaTime;
        }
        else
        {
            current_time = 2f;
            speed = -speed;
        }
    }
}
